<?php if(Yii::app()->user->checkAccess('admin')){
$this->menu=array(
	array('label'=>'List User', 'url'=>array('index')),
	array('label'=>'Create User', 'url'=>array('create')),
	array('label'=>'Update User', 'url'=>array('update', 'id'=>$model->id)),
	array('label'=>'Delete User', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
);
?>
<?php } else if(Yii::app()->user->checkAccess('alumni')){
    $this->menu=array(
    array('label'=>'Batch History', 'url'=>array('batchHistory/index')),
    array('label'=>'Mission Assignment', 'url'=>array('missionAssignment/index')),
    array('label'=>'Update profile', 'url'=>array('alumni/update','type'=>'alumni','id'=>$alumni->id)),
);
?>
<?php } else {
    $this->menu=array(
    array('label'=>'Batch History', 'url'=>array('batchHistory/index')),
    array('label'=>'Mission Assignment', 'url'=>array('missionAssignment/index')),
    array('label'=>'Update profile', 'url'=>array('volunteer/update','type'=>'volunteer', 'id'=>$volunteer->id)),
);
}
?>


<div class="member_info">
	<div class="member_image">
        <?php if ($model->user_photo != null){?>
        <a href="<?php echo Yii::app()->baseURL.'/files/images/'.$model->user_photo?>" class="popup">
            <img src="<?php echo Yii::app()->baseURL.'/files/images/'.$model->user_photo?>" />
        </a>
        <?php } else { ?>
            <i>No Image Available</i>
        <?php } ?>
    </div>

 <div class="member_user">
        <h1><?php echo $model->getFullName(); ?></h1>
        
        <label>Username:</label>
            <?php echo $model->username; ?>
        <?php if(Yii::app()->user->checkAccess('admin')){?>

        <?php } else if(Yii::app()->user->checkAccess('alumni')){ ?>
        
        <?php } else { ?>
                    
                    <?php if(Yii::app()->user->checkAccess('volunteer')){?>
            <?php } ?>
        <?php } ?>
         <br>
        <label>Type:</label>
            <?php echo $model->roles; ?>
		 <br>
         <label>Mobile:</label>
    		<?php echo $model->user_mobile; ?>
    	 <br>
    	 <label>Email:</label>
    		<?php echo $model->user_email; ?>
    	 <br>
 </div>  
    <div class="clear"></div>
</div>
 </div>

<div class="span-16" id="view">
<?php if(Yii::app()->user->checkAccess('admin') || Yii::app()->user->checkAccess('encoder')) { ?>
<?php $this->widget('bootstrap.widgets.TbDetailView', array(
    'type'=>'striped bordered condensed',
    'data'=>$model,
    'attributes'=>array(
        'user_gender', 
        'user_birthdate',
        'user_marital_status', 
        'user_address1', 
        'user_address2',
        'user_landline', 
    ),
)); ?>
// <?php } else if(Yii::app()->user->checkAccess('alumni')) { ?>
<?php $this->widget('bootstrap.widgets.TbDetailView', array(
    'type'=>'striped bordered condensed',
    'data'=>$alumni,
    'attributes'=>array(
        'user.user_gender', 
        'user.user_birthdate',
        'user.user_marital_status', 
        'user.user_address1', 
        'user.user_address2',
        'user.user_landline', 
    ),
)); ?>
<h2>Alumni Details</h2>
<?php $this->widget('bootstrap.widgets.TbDetailView', array(
    'type'=>'striped bordered condensed',
    'data'=>$alumni,
    'attributes'=>array(
        'userCode',
        'alumni_registration_date',
        'alumni_occupation',
        'alumni_company_name',
        'alumni_company_contact_num',
    ),
)); ?>
<?php } else { ?>
<?php $this->widget('bootstrap.widgets.TbDetailView', array(
    'type'=>'striped bordered condensed',
    'data'=>$volunteer,
    'attributes'=>array(
        'user.user_gender', 
        'user.user_birthdate',
        'user.user_marital_status', 
        'user.user_address1', 
        'user.user_address2',
        'user.user_landline', 
    ),
)); ?>
<h2>Volunteer Details</h2>
<?php $this->widget('bootstrap.widgets.TbDetailView', array(
    'type'=>'striped bordered condensed',
    'data'=>$volunteer,
    'attributes'=>array(
        'volunteerCode',
        'volunteer_start_date',
        'school',
        'volunteer_course',
        'volunteer_religion',
    ),
)); ?>
<?php }?>
<?php
$this->widget("ext.magnific-popup.EMagnificPopup", array('target' => '.popup'));
?>







